Skip to content

Gracefully provide an error if JSON tailoring doesn't exist#2372

Open
Mab879 wants to merge 1 commit into
OpenSCAP:mainfrom
Mab879:fix_2369
Open

Gracefully provide an error if JSON tailoring doesn't exist#2372
Mab879 wants to merge 1 commit into
OpenSCAP:mainfrom
Mab879:fix_2369

Conversation

@Mab879

@Mab879 Mab879 commented Jun 15, 2026

Copy link
Copy Markdown
Member

Fixes #2369

@Mab879 Mab879 added this to the 1.4.5 milestone Jun 15, 2026
Comment thread utils/autotailor Outdated
def import_json_tailoring(self, json_tailoring):
json_tailoring_path = pathlib.Path(json_tailoring).absolute()
if not json_tailoring_path.is_file():
raise ValueError("JSON Tailoring file does not exist or is not a file.")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the file name to the error message.

@jan-cerny jan-cerny self-assigned this Jun 16, 2026
@Mab879 Mab879 requested a review from jan-cerny June 16, 2026 18:18
@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

autotailor doesn't handle missing files --json-tailoring gracefully

2 participants